<script setup>
import { useUserStore } from '@/store/user'
const store = useUserStore()

const addAge = () => {
  let newAge = store.age + 1
  store.getUserAge(newAge)
}
let url = import.meta.env.VITE_APP_URL
console.log('url', url)

</script>
 
<template>
  <div class="box">
    <div>初始值: {{ store.age }}</div>
    <div>getters获取值：{{ store.userAge }}</div>
    <el-button @click="addAge" type="primary">累加</el-button>
  </div>
</template>
 
<style scoped lang="scss">
.box div {
  text-align: center;
  line-height: 30px;
}
</style>

